package com.songyang.Restaurant.Model;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    int code;
    Object data;
    String message;

    public static Result success(Object data){
        return new Result(200,data,"success");
    }
    public static Result success(){
        return new Result(200,null,"success");
    }
    public static Result error(String message){
        return new Result(500,null,message);
    }
}
